package Demo3;

public class Computer implements USB{
    public Computer() {
        super();
    }

    @Override
    public void openDevice() {
        System.out.println("open your compuuter");
    }

    @Override
    public void closeDevice() {
        System.out.println("close your computer");
    }
    public void useDevice(USB usb){
        usb.openDevice();
        if (usb instanceof Mouse){
            Mouse mouse=(Mouse)usb;
            mouse.click();
        }
    }

}
